<?php

use App\Http\Controllers\GoodsController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\LiuYanController;
use App\Http\Controllers\LoginController;
use App\Http\Controllers\OrderController;
use App\Http\Controllers\UploadController;
use App\Http\Controllers\UsersController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

//Route::get('/login', [LoginController::class, 'index'])
//    ->name('login');

Route::get('/', [HomeController::class, 'index'])->name('is_home');

Route::get('/doHome', [HomeController::class, 'doHome'])->name('doHome');


Route::get('/isLogin', [LoginController::class, 'index'])->name('is_login');
Route::get('/destroy', [LoginController::class, 'destroy'])->name('destroy');

Route::post('/doLogin', [LoginController::class, 'doLogin'])->name('do_login');


Route::get('/goods/lists', [GoodsController::class, 'lists'])->name('goods_lists');
Route::match(['get','post'],'/goods/doLists', [GoodsController::class, 'doLists'])->name('goods_doLists');

Route::get('/goods/add', [GoodsController::class, 'add'])->name('goods_add');
Route::match(['get','post'],'/goods/doAdd', [GoodsController::class, 'doAdd'])->name('goods_doAdd');
Route::get('/goods/update', [GoodsController::class, 'update'])->name('goods_update');
Route::match(['get','post'],'/goods/doUpdate', [GoodsController::class, 'doUpdate'])->name('goods_doUpdate');
Route::match(['get','post'],'/goods/status', [GoodsController::class, 'status'])->name('goods_status');
Route::match(['get','post'],'/goods/del', [GoodsController::class, 'del'])->name('goods_del');


Route::match(['get','post'],'/upload/file', [UploadController::class, 'actionFile'])->name('upload_file');
Route::match(['get','post'],'/upload/pic', [UploadController::class, 'actionPic'])->name('upload_pic');

Route::match(['get','post'],'/liuyan/lists', [LiuYanController::class, 'lists'])->name('liuyan_lists');
Route::match(['get','post'],'/liuyan/doLists', [LiuYanController::class, 'doLists'])->name('liuyan_doLists');


Route::match(['get','post'],'/users/lists', [UsersController::class, 'lists'])->name('users_lists');
Route::match(['get','post'],'/users/doLists', [UsersController::class, 'doLists'])->name('users_doLists');

Route::match(['get','post'],'/order/lists', [OrderController::class, 'lists'])->name('order_lists');
Route::match(['get','post'],'/order/doLists', [OrderController::class, 'doLists'])->name('order_doLists');
Route::match(['get','post'],'/order/edit', [OrderController::class, 'edit'])->name('order_edit');
Route::match(['get','post'],'/order/doEdit', [OrderController::class, 'doEdit'])->name('order_doEdit');



Route::match(['get','post'],'/order/del', [OrderController::class, 'del'])->name('order_del');
Route::match(['get','post'],'/liuyan/del', [LiuYanController::class, 'del'])->name('liuyan_del');
Route::match(['get','post'],'/users/del', [UsersController::class, 'del'])->name('users_del');
